package core.data;

public class SuccessResult extends DataResult {
    public static final int CODE = 200;
    public final Object data;
    public SuccessResult(Object data, Integer code) {
        super("success", code != null ? code : SuccessResult.CODE );
        this.data = data;
    }

    @Override
    public String toString(){
        return "{\"status\":\"" + this.status + "\",\"code\":" + this.code + "\"data\":" + this.data.toString() + "}";
    }
}
